<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>帖子详情</title>
    <link rel="stylesheet" href="public/css/showpost.css">
    <script src="public/js/jquery.js"></script>
    <script src="public/js/showpost.js"></script>
</head>
<body>
    <div class="ding">
		这里是提示信息！
	</div>
  <!-- 这里是写评论的地方 -->
  <div class="pcom">
    <span style="font-weight: 600;color: red;font-size: 20;cursor: pointer;">x</span>
    <div class="icom" contenteditable="true"></div>
    <div class="input">评论</div>
       <p style="text-align: center;font-weight: 600;">配图</p>
        <input type="file" id="image" lay-verify="required" onchange="toBase64()" accept="image/jpeg,image/png,image/jpg" class="layui-upload-button" id='file' style="margin-left: 20px;">
        <div class="layui-upload-list plimg" style="text-align: center;">
            <img class="layui-upload-img" name="titleBase64Img" id="base64Img" src="" >
        </div>
</div>



    <!-- 返回首页 -->
     <a href="javascript:;" class="back" onclick="window.history.go(-1);">返回</a>
    <div class="join">加入讨论</div>


    <!-- 帖子的主模块 -->
    <div class="post">
        <div class="title">万万没想到啊！！！！！</div>
        <!-- 楼主的楼！ -->
        <div class="head">
            <p class="name">
                <span>默认名</span>（<span>北京时间三点</span>）
            </p>
            <div class="con maincon">
                无正文
            </div>
            <div style="text-align: center;">
                    <img src="" alt="" class="img">
            </div>
        </div>
        <!-- 其他人的楼！！ -->
 
    </div>
    <script>
        function toBase64(){
    var file = document.querySelector('input[type=file]').files[0];
    var reader = new FileReader();
    reader.onloadend = function () {
        $("#base64Img").attr("style","display:inline-block");
        $("#base64Img").attr("src",reader.result);
        img = reader.result;
    }
    if (file) {
        reader.readAsDataURL(file);
    }

}
    </script>
</body>
</html>